Hive删除分区 您所在的位置:网站首页 hive 删除分区范围 Hive删除分区

Hive删除分区

2023-12-25 04:22| 来源: 网络整理| 查看: 265

Hive删除分区 转载

mb5fe32930661bd 2021-06-10 22:36:34

文章标签 java 文章分类 Java 后端开发

学点关于大数据知识 hive

 

      -- 删除指定分区        alter table mydw.dm_msg_push_sum_day drop partition(dt='20210219')      --  删除库      drop database if exists db_name;      --  强制删除库      drop database if exists db_name cascade;      --  删除表      drop table if exists employee;      --  清空表      truncate table employee;      --  清空表,第二种方式      insert overwrite table employee select * from employee where 1=0;       --  删除分区      alter table employee_table drop partition (stat_year_month>='2018-01');      --  按条件删除数据      insert overwrite table employee_table select * from employee_table where id>'180203a15f';      hive删除分区需要用alter语句      alter table table_name drop if exists partition(par_col=col_name)      tips: par_col为分区列名,colname为需要删除分区的具体名      删除date=20190909分区数据      alter table data_test drop if exists partition(date=20190909)https://mp.weixin.qq.com/s/1tMdg1wM_A1iUcMOaxaQiw 收藏 评论 分享 举报

上一篇:Elasticsearch创建索引

下一篇:扎心了!代码太乱,主动加班加点重构代码,结果却被扣绩效了



【本文地址】

公司简介

联系我们

今日新闻

    推荐新闻

    专题文章
      CopyRight 2018-2019 实验室设备网 版权所有